Modular polymorphic defunctionalization
نویسندگان
چکیده
Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation for a functional programming language with parametric polymorphism. Our technique allows modules in a Haskell-like language to be separately defunctionalized and compiled, then linked together to generate an executable program. We provide a prototype implementation of our modular defunctionalization technique and we discuss the experiences of its application in compiling a large subset of Haskell to low-level C code, based on the intensional transformation.
منابع مشابه
Polymorphic typed defunctionalization and concretization
Defunctionalization is a program transformation that eliminates functions as first-class values. We show that defunctionalization can be viewed as a type-preserving transformation of an extension of System F with guarded algebraic data types into itself. We also suggest that defunctionalization is an instance of concretization, a more general technique that allows eliminating constructs other t...
متن کاملSupporting Separate Compilation in a Defunctionalizing Compiler
Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation. Our technique allows modules in a Haskell-like language to be separately defunctionalized and compiled, then linked together to generate an executable program. We p...
متن کاملAlternate Control-Flow Analyses for Defunctionalization in the MLton Compiler
Background Defunctionalization is a program transformation in MLton that converts a higher-order program into a first-order program. Control-flow analysis (CFA) is the algorithm that identifies the set of functions that could be invoked at each call site in the program. This analysis is used to guide defunctionalization in the creation of flow sets that replace higher-order functions in the new...
متن کاملOn the Relation of Interaction Semantics to Continuations and Defunctionalization
In game semantics and related approaches to programming language semantics, programs are modelled by interaction dialogues. Such models have recently been used in the design of new compilation methods, e.g. for hardware synthesis or for programming with sublinear space. This paper relates such semantically motivated non-standard compilation methods to more standard techniques in the compilation...
متن کاملStructure-Dependent Thermal Defunctionalization of Single-Walled Carbon Nanotubes.
Covalent sidewall functionalization of single-walled carbon nanotubes (SWCNTs) is an important tool for tailoring their properties for research purposes and applications. In this study, SWCNT samples were first functionalized by reductive alkylation using metallic lithium and 1-iodododecane in liquid ammonia. Samples of the alkyl-functionalized SWCNTs were then pyrolyzed under an inert atmosphe...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Comput. Sci. Inf. Syst.
دوره 11 شماره
صفحات -
تاریخ انتشار 2014